<template>
  <div class="mecell" @click="clickCell">
    <div class="mecell-left" v-if="leftText">
      <img :src="mecellLeftIcon">
      <span class=".mecell-left-text">{{leftText}}</span>
    </div>
    <div class="mecell-right-text" v-if="rightText">{{rightText}}</div>
    <div class="mecell-avatar" v-if="avatarShow"><img :src="avatarUrl"></div>
    <i class="mecell-icon icomoon-iconfont-platform-entrance" v-if="iconShow"></i> 
  </div>
</template>
<script>
export default {
  props:{
    leftText:{ type: String, default: "" }, //左侧文字文本
    rightText:{ type: String, default: "" }, //右侧文字文本
    avatarShow:{ type: Boolean, default: false }, //是否显示头像
    avatarUrl:{ type: String, default: require("../../static/images/touxiang.png") }, //是否显示头像
    mecellLeftIcon:{ type: String }, //是否显示头像
    iconShow:{ type: Boolean, default: true }, //是否显示图标
    clickCell: { type: Function, default: () => {} } //点击事件
  },
  mounted(){
  }
};
</script>

<style lang="scss" scoped>
  .mecell{
    width: 100%;
    height: 75rpx;
    background-color: #fff;
    margin-bottom: 2rpx;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40rpx;
    .mecell-left{
      display: flex;
      justify-content: center;
      align-items: center;
      img{
        width: 40rpx;
        height: 40rpx;
        border-radius: 50%;
        margin-right: 8rpx;
      }
      .mecell-left-text{
        font-weight: 500;
        color:#6d6c6c;
      }
    }
    .mecell-icon{
      color: #6d6c6c;
      transform:rotate(-90deg);
    }
    .mecell-avatar{
      width: 70rpx;
      height: 70rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #dbdbdb;
      img{
        width: 70rpx;
        height: 70rpx;
      }
    }
  }
</style>
